/*
 * @Author: your name
 * @Date: 2021-01-26 10:42:13
 * @LastEditTime: 2021-01-26 10:53:45
 * @FilePath: \flutter_study\lib\pages\pageDetail.dart
 */
import 'package:flutter/material.dart';
import '../mock/posts.dart';

class PageDetail extends StatelessWidget {
  final Post post;

  PageDetail({@required this.post});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(post.title),
        centerTitle: true,
      ),
      body: Column(
        children: <Widget>[
          Container(
            child: Image.network(
              post.imageUrl,
              fit: BoxFit.cover,
            ),
          ),
          SizedBox(height: 16.0),
          Text(post.title,
              style: TextStyle(fontSize: 18.0, fontWeight: FontWeight.bold)),
          Text(post.author),
          SizedBox(height: 32.0),
          Text(post.description)
        ],
      ),
    );
  }
}
